CFLAGS = -Wall -g
INCLUDES = -Iinclude

all: tbsclient

tbsclient: main.c protocol.o communication.o ticket.o
	gcc $(CFLAGS) $(INCLUDES) -lncurses -o tbsclient $^

protocol.o: protocol.c include/protocol.h 
	gcc $(CFLAGS) $(INCLUDES) -c protocol.c

ticket.o: ticket.c include/ticket.h 
	gcc $(CFLAGS) $(INCLUDES) -c ticket.c
	
communication.o: communication.c include/communication.h
	gcc $(CFLAGS) $(INCLUDES) -c communication.c
	
clean:
	rm protocol.o communication.o ticket.o tbsclient test

